import { createStore, combineReducers,applyMiddleware } from "redux";
import thunk  from "redux-thunk"//中间件
import { composeWithDevTools } from "redux-devtools-extension"//redux-dev-tools 工具引入
import login from "./modules/login"
import register from "./modules/register"
import home from "./modules/home"
import cate from "./modules/cate"
import detail from "./modules/detail"
import shop from "./modules/shop"
import mine from "./modules/mine"

const reducer = combineReducers({//combineReducers合并
    login,
    register,
    home,
    cate,
    detail,
    shop,
    mine,
})


const store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)))

export default store;